package com.shine.service.impl;

import com.shine.dao.ShuiHuDao;
import com.shine.dao.impl.ShuiHuDaoImpl;
import com.shine.entity.ShuiHu;
import com.shine.service.ShuiHuService;

import java.io.IOException;
import java.sql.SQLException;
import java.util.List;

/**
 * 业务层实现类
 */
public class ShuiHuServiceImpl implements ShuiHuService {

    private ShuiHuDao shuiHuDao = new ShuiHuDaoImpl();

    @Override
    public Integer saveShuiHu(ShuiHu shuiHu) {
        return null;
    }

    @Override
    public Integer removeShuiHu(Integer id) {
        return null;
    }

    @Override
    public Integer modifyShuiHu(ShuiHu shuiHu) {
        return null;
    }

    @Override
    public ShuiHu queryShuiHuById(Integer id) {
        return null;
    }

    @Override
    public ShuiHu queryShuiHuByUsername(String username) {
        return null;
    }

    @Override
    public List<ShuiHu> queryAllShuiHu() {
        List<ShuiHu> shuiHus = null;
        try {
            shuiHus = shuiHuDao.selectAllShuiHu();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return shuiHus;
    }
}
